package org.springframework.security.core.authority.mapping;

import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * @author Dillon
 * @date 2024/7/11
 * @slogan 致敬大师 致敬未来的你
 * @desc 默认的权限映射类 即不做处理，返回原权限
 */
public class NullAuthoritiesMapper implements GrantedAuthoritiesMapper {

	/**
	 * 权限映射
	 *
	 * @param authorities 映射前权限集合
	 * @return 映射后权限集合
	 */
	@Override
	public Collection<? extends GrantedAuthority> mapAuthorities(Collection<? extends GrantedAuthority> authorities) {
		return authorities;
	}

}
